#pragma once

#include "AutoGen_RenderData.h"

class RenderMethod
{
public:

	void						Initialise(gk::GpuProgramHandle hGpuProgram);
	void						Release();

	gp::ConstantBufferSetHandle	GetConstantBufferSet()							{ return m_constantBufferSet; }
	gk::GpuProgramHandle		GetGpuProgram()									{ return m_hGpuProgram; }

	void						SetParam(Data_RenderData::RenderData* pRenderData, cr::uint32_t idxParam);

private:

	gp::ConstantBufferSet		m_constantBufferSet;
	gk::GpuProgramHandle		m_hGpuProgram;
};

class Material
{
public:

	RenderMethod&				CreateRenderMethod(cr::HashedString hsName, gk::GpuProgramHandle hGpuProgram);
	RenderMethod&				GetRenderMethod(cr::HashedString hsName);
	void						ReleaseRenderMethods();
private:

	typedef std::map<cr::HashedString, RenderMethod>	TRenderMethodMap;
	TRenderMethodMap									m_renderMethods;
};